import Vue from 'vue'
import Router from "vue-router"
Vue.use(Router);
// 导入路由
import Home from "./views/Home.vue"
import Index from "./views/index/Index.vue"
import Fellow from "./views/fellow/Fellow.vue"
import VideoList from "./components/index/VideoList.vue"

const router = new Router({
  routes: [
    // 设置一个重定向
    { path: "/", redirect: "/home/index" },
    {
      path: "/home",
      name: "home",
      component: Home,
      children: [
        { 
          path: "/home/index", 
          name:"index",
          component: Index, 
          children:[
            { path: "/home/index", component: VideoList}
          ] },
        { path: "/home/fellow", component: Fellow },
      ],
    },
  ],
});

export default router
